package com.ruoyi.business.mapper;

import java.util.List;

import com.ruoyi.bizsys.domain.BankCode;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.bizsys.domain.CreditAccount;
import com.ruoyi.bizsys.domain.LoanIou;
import com.ruoyi.business.domain.LoanInfo;

/**
 * @Author: Jamnsin
 * @Date: 2019/12/6 4:13 下午
 */
@Mapper
public interface BLoanInfoMapper {

    public List<LoanInfo> getLoanInfoListByCustNo(@Param("custNo")String custNo,@Param("status")String status);
    
    public LoanInfo getLoanInfoListBySerialNo(@Param("custNo")String custNo, @Param("serialNo")String serialNo);
    
    public List<LoanIou> getActiveLoanIouByCustNo(@Param("custNo")String custNo);
    
    public List<CreditAccount> getBatchJobOnLoanAccount(@Param("batchDate")String batchDate, @Param("startLimit")int startLimit, @Param("step")int step);
    
    public List<CreditAccount> getLoanOffsetFailAccount();
    
    public Integer getBatchJobOnLoanAccountNum(@Param("batchDate")String batchDate);
    
    public List<LoanIou> getBatchJobActiveLoanIou(@Param("batchDate")String batchDate, @Param("custNo")String custNo);

    List<CreditAccount> getBatchJobOnLoanAccountAll(@Param("batchDate")String batchDate);

    CreditAccount getOneOnLoanAccountAll(@Param("batchDate")String batchDate, @Param("custNo")String custNo);
    List<LoanIou> getFirstByCustNo(@Param("custNo") String custNo);

    BankCode getBanckInfoByAccountNumber(@Param("accountNumber")String accountNumber);

    Integer getCurrentOverdue(@Param("custNo") String custNo);

    List<LoanIou> getBatchJobActiveLoanIouAll(@Param("custNo")String custNo,@Param("minDays")Integer minDays,@Param("maxDays")Integer maxDays,@Param("subtractDays")Integer subtractDays,@Param("surplusDays")Integer surplusDays);

    /**
     * 是否有Processing，OutStanding的订单
     * @param custNo
     * @return
     */
    int isLoanInfoListByInTransit(@Param("custNo") String custNo);

    List<LoanIou> getFirstOverdueByCustNo(@Param("custNo")String custNo);

}
